<!DOCTYPE HTML>
<html lang="fr">
  <head>
  <%= render '_header' %>
  </head>

  <body>
    <%= render '_social' %>
    <div id="main">
      <h1><%= @item[:title] %></h1>

      <%= render '_juicy_content' %>

      <% if @item[:pagination] 
	   if (@item[:pagination][:total_page] < 2) %>
	 <p>Cette page contient <em>
	   <%= nb_image_text(person_image_nb(@item[:title])) %></em>
	   de <strong><%= @item[:title] %></strong>.</p>
      <% else %>
         <p>Cette section contient <em>
	   <%= nb_image_text(person_image_nb(@item[:title])) %></em>
	   de <strong><%= @item[:title] %></strong>
	   sur <em><%= @item[:pagination][:total_page] %></em> pages.
           </p>
      <%  end %>

      <% if person_image_list( slug_for(@item[:title])).nil? %>
      <strong>Aucune image associé à cette célébrité.</strong>
      <% else %>
        <ul class="gallery">
	  <% ipp = @config[:images_per_page]
	     first = ipp * (@item[:pagination][:page]-1) 
	     last  = (first + ipp) - 1 
	   
	     person_image_list( slug_for(@item[:title]))[first..last].each do 
	     |img|
	   %>
          <li>
            <%= render '_thumbnail', :image => img %>
          </li>
          <% end %>
        </ul>
      <% end %>
      <% end  # End the if pagination for personnalites page%>

      <%= yield %>
    <div style="clear:both;"></div>  
    <%= render '_pagination', :pagination =>  @item[:pagination]%>

      <%= render '_juicy_leaderboard' %>
    </div>
    <%= render '_sidebar' %>
    <%= render '_footer' %>
  </body>
</html>
